// pages/framework/index.js
const app = getApp()
Page({

  /**
   * 页面的初始数据
   */
  data: {
    nickName: "",
    avatarUrl: ""
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    this.setData({
      nickName: app.nickName,
      avatarUrl: app.avatarUrl
    })
  },
  changeNickName() {
    app.changeNickName("12345");
    this.setData({
      nickName: app.nickName,
    });
  }
})